package Tools;

import org.newdawn.slick.Sound;

/** Sound Manager class
 * @author Aikidos
 */
public class SoundManager {
	
	/** Play sound from resource manager
	 * @param resourceName - Resource name
	 */
	public static void play(String resourceName) {
		if (!Configuration.isMute()) {
			((Sound)ResourceManager.getPool().get(resourceName)).play();
		}
	}
	
	/** Play sound from resource manager
	 * @param resourceName - Resource name
	 * @param volume - Volume
	 */
	public static void play(String resourceName, float volume) {
		if (!Configuration.isMute()) {
			((Sound)ResourceManager.getPool().get(resourceName)).play(1.f, volume);
		}
	}

}
